<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/1/18
 * Time: 15:40
 */

namespace addons\admin\controller;


use app\common\Code;
use app\common\model\Sellers;

class Seller extends Common
{
    /**
     * 获取商家信息
     * @return mixed
     */
    public function list_()
    {
        $this->check_login();
        $param = input();
        $list_ = \addons\admin\service\Seller::list_($param);
        $this->assign("param", $param);
        $this->assign("list_", $list_);
        return $this->fetch();
    }

    /**
     * @return mixed
     */
    public function seller_examine_()
    {
        $this->check_login();
        $param = input();
        $seller_ = Sellers::get_seller_by_id($param['id']);
        $this->assign("seller", $seller_);
        return $this->fetch();
    }

    /**
     * @return mixed
     */
    public function seller_examine()
    {
        $this->check_login();
        $param = input();
        Sellers::edit_seller($param['user_id'],$param);
        response_json(Code::NONE);
    }

}